<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="referrer" content="never">
    <title>新闻页</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        ul {
            margin: 30px;
            list-style: none;
        }

        ul li {
            float: left;
            width: 100px;
            text-align: center;
            border-right: 2px solid #f00;
            cursor: pointer;
        }

        ul li:first-child {
            border-left: 2px solid #f00;
        }
    </style>
</head>
<body>
    <ul>
        <li>军事</li>
        <li>政治</li>
        <li>体育</li>
        <li>娱乐</li>
        <li>财经</li>
    </ul>

    <script type="text/javascript">
        var ulEle = document.querySelector("ul");

        ulEle.onclick = function (){
            var ele = event.target;
            // 查验点击元素
            if(ele.tagName == "LI"){
                // URL传入汉字被编码，编码方式 encodeURI(xxx)  解码方式 decodeURI(xxx)
                open("./newsDetail.html?type=" + ele.innerText + "&content=xx", "_self");
            }
        }
    </script>
</body>
</html>